//part1:C03:ex3.39.2.cpp -- compare two string, with C-style chars.
#include <iostream>
#include <cstring>

int main(void)
{
    using namespace std;
    const unsigned ArSize = 80;
    char str1[ArSize], str2[ArSize];
    cout << "Enter two strings:" << endl;
    cin >> str1 >> str2;
    auto result = strcmp(str1, str2);
    switch(result)
    {
        case 1:
            cout << "str1 > str2" << endl;
            break;
        case -1:
            cout << "str1 < str2" << endl;
            break;
        case 0:
            cout << "str1 == str2" << endl;
            break;
        default:
            cout << "no suitable answer!" << endl;
            break;
    }

    return 0;
}
